package com.shijie.mapper;

import com.shijie.aop.annotation.AutoTimeFill;
import com.shijie.entity.Pool;
import com.shijie.vo.JudgePoolVO;
import com.shijie.vo.PoolVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PoolMapper {

    List<PoolVO> list();

    @AutoTimeFill({AutoTimeFill.CREATE_TIME, AutoTimeFill.UPDATE_TIME})
    boolean save(@Param("pool") Pool pool);

    PoolVO getByPoolId(@Param("poolId") Long poolId);

    @AutoTimeFill({AutoTimeFill.UPDATE_TIME})
    boolean update(@Param("pool") Pool pool);

    boolean delete(@Param("poolId") Long poolId);

    Pool getJudgeRequire(@Param("poolId") Long poolId);
}
